package spec.zhangyuehua.$04.example.e_4_15;

/**
 * Created by yue on 2017/10/25.
 */
public class MathTest {
    public static void main(String[] args) {
        double d= Math.sin(Math.PI/3);
        double a=Math.cos(Math.PI);
        double c=Math.tan(Math.PI/2);
        double b=Math.asin(0);
        double e=Math.acos(1);
        double f=Math.atan(1);
        double g=Math.toRadians(45);
        double h=Math.toDegrees(Math.PI/2);
        System.out.println("60度的正弦值："+d);
        System.out.println("180度的余弦值："+a);
        System.out.println("90度正切值："+c);
        System.out.println("0的反正弦值："+b);
        System.out.println("1的反余弦值："+e);
        System.out.println("1的反正切值："+f);
        System.out.println("45度的弧度值："+g);
        System.out.println("π/2的角度值："+h);
        System.out.println("e的3次方："+Math.exp(3));
        System.out.println("3的自然对数："+Math.log(3));
        System.out.println("以10为3的自然对数："+Math.log10(3));
        System.out.println("9的平方根值："+Math.sqrt(9));
        System.out.println("2的3次值："+Math.pow(2,3));
        System.out.println("Math.ceil(8.3)="+Math.ceil(8.3));
        System.out.println("Math.floor(3.5)="+Math.floor(3.5));
        System.out.println("Math.rint(3.7)="+Math.rint(3.7));
        System.out.println("Math.roud(2.5)="+Math.round(2.5));
        System.out.println("Math.roud(4.3f)="+Math.round(4.3f));
        System.out.println("4.8h和3.2中较大者："+Math.max(4.8,3.2));
        System.out.println("4.8h和3.2中较小者："+Math.min(4.8,3.2));
        System.out.println("-3的绝对值："+Math.abs(-3));
    }
}
